import { axios } from '~/plugins/axios';

// 根据id获取新闻
export const getNewsInfo = (params?: any) => axios({
  method: 'get',
  url: `/dynamiNews/detail/${params as string} `,
}) as Promise<any>;

// 新增新闻 (编辑新闻)
export const addNews = (params: any) => axios({
  method: 'post',
  url: '/dynamiNews/addNews',
  data: {
    ...params,
  },
}) as Promise<any>;
